<template>
  <div class="c-flex-column c-aligni-center c-ph24">
    <div class="c-bg-mgreen c-ww160 c-hh160 c-brp50 c-textAlign-c c-pt40 c-mt100">
      <span class="icon iconfont c-fc-white c-fs80">&#xe6ea;</span>
    </div>
    <div class="c-fs36 c-fc-sxblack c-mt64">提交成功</div>
    <div class="c-fs24 c-fc-sxblack c-mt20">{{questionCustom == 1 ? '待后台审核信息后，您将显示在光之管道列表中' : '待商户完善信息后，您将显示在答主列表中'}}</div>
    <div class="c-bd1 c-mt64 c-br6 c-fs28 c-w100 c-pv20 c-textAlign-c c-fc-sblack" @click="clickGoQA">前往{{questionCustom == 1 ? '预约' : '问答'}}专区</div>
  </div>
</template>

<script>
import { utilJs } from "@/utils/common.js";
export default {
  name: "ApplySuccess",
  components: {},
  props: [],
  beforeCreate() { },
  data() {
    return {
      theme: localStorage.getItem("colorName")
        ? localStorage.getItem("colorName")
        : "mb5_default",
      questionCustom: localStorage.getItem("questionCustom"), //定制阿卡西线上学院
      dataInfo: ""
    };
  },
  created() {
    utilJs.appShare(this);
  },
  mounted() { },
  computed: {},
  watch: {},
  methods: {
    //点击问答专区
    clickGoQA() {
      this.$routerGo(this, "push", { path: "/homePage/qa/answerLord" });
    },
    //分享
    wechatShare: function () {
      let questionInfo = JSON.parse(window.localStorage.getItem("questionInfo"));
      let title = questionInfo.title;
      let shareImg = questionInfo.cover;
      let shareUrl = `${window.location.href.split("#")[0]}#/homePage/qa/answerLord?refereeId=${localStorage.getItem("userId")}`;
      let shareDesc = questionInfo.describe;
      utilJs.wechatConfig(shareUrl, title, shareImg, shareDesc, function () { });
    },
    //手机端分享
    appShare() {
      let questionInfo = JSON.parse(window.localStorage.getItem("questionInfo"));
      let title = questionInfo.title;
      let shareImg = questionInfo.cover;
      let shareUrl = `${window.location.href.split("#")[0]}#/homePage/qa/answerLord?refereeId=${localStorage.getItem("userId")}`;
      let shareDesc = questionInfo.describe;
      utilJs.appShareTrue(title, shareImg, shareUrl, shareDesc);
    }
  },
  activated() {
    setDocumentTitle("提交成功");// eslint-disable-line

    this.$store.commit("updateLoadingStatus", {
      isLoading: false
    });
    this.wechatShare();
  },
  deactivated() { }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
